<?php
$dummy_image_path = get_stylesheet_directory_uri().'/images/dummy/';
set_time_limit(0);
global  $wpdb;

/*echo "<pre>";
print_r(get_option('sidebars_widgets'));
//print_r(get_option('widget_pages'));
print_r(get_option('widget_categories'));
exit;
*/

/////////////// GENERAL SETTINGS START ///////////////
$shoppingcart_general_settings = get_option('shoppingcart_general_settings');
if(!$shoppingcart_general_settings || ($shoppingcart_general_settings && count($shoppingcart_general_settings)==0))
{
	$cartinfo = array(
						"currency"				=> 'USD',
						"currencysym"			=> '$',
						"site_email"			=>   get_option('admin_email'),
						"site_email_name"		=>	get_option('blogname'),
						"tax"					=>	'0.00',
						"is_show_weight"		=>	'1',
						"store_type"			=>	'cart',
						"imagepath"				=>	"",		
						"is_show_coupon"		=>	"1",
						"dash_noof_orders"		=>	"10",
						"is_show_tellafrnd"		=>	"1",
						"is_show_addcomment"	=>	"0",
						"checkout_type"			=>	"cart",
						"is_show_relproducts"	=>	"1",
						"digitalproductpath"	=>	"",
						"is_show_blogpage"		=>	"1",
						"is_show_storepage"		=>	"1",
						"is_show_category"		=>	"1",
						"checkout_method"		=>	"normal",
						"is_show_termcondition"	=>	'1',
						"termcondition"			=>	'Accept Terms and Conditions',
						"loginpagecontent"		=>	'If you are an existing customer of [#$store_name#] or have previously registered you may sign in below or request a new password. Otherwise please enter your information below and an account will be created for you.',												
						"bill_address1"			=>	"1",
						"bill_address2"			=>	"1",																	
						"bill_city"				=>	"1",
						"bill_state"			=>	"1",
						"bill_country"			=>	"1",
						"bill_zip"				=>	"1",
						"is_active_affiliate"	=>	"0",
						"send_email_guest"		=>	"1",						
						);
	foreach($cartinfo as $key=>$val)
	{
		update_option($key,$val);
	}
}
/////////////// GENERAL SETTINGS END ///////////////
/////////////// PAYMENT SETTINGS START ///////////////
	$paymethodinfo = array();
	$payOpts = array();
	$payOpts[] = array(
					"title"			=>	"Merchant Id",
					"fieldname"		=>	"merchantid",
					"value"			=>	"myaccount@paypal.com",
					"description"	=>	"Example : myaccount@paypal.com",
					);
	$payOpts[] = array(
					"title"			=>	"Cancel Url",
					"fieldname"		=>	"cancel_return",
					"value"			=>	get_option('siteurl')."/?ptype=cancel_return&pmethod=paypal",
					"description"	=>	"Example : http://mydomain.com/cancel_return.php",
					);
	$payOpts[] = array(
					"title"			=>	"Return Url",
					"fieldname"		=>	"returnUrl",
					"value"			=>	get_option('siteurl')."/?ptype=return&pmethod=paypal",
					"description"	=>	"Example : http://mydomain.com/return.php",
					);
	$payOpts[] = array(
					"title"			=>	"Notify Url",
					"fieldname"		=>	"notify_url",
					"value"			=>	get_option('siteurl')."/?ptype=notifyurl&pmethod=paypal",
					"description"	=>	"Example : http://mydomain.com/notifyurl.php",
					);								
	$paymethodinfo[] = array(
						"name" 		=> 'Paypal',
						"key" 		=> 'paypal',
						"isactive"	=>	'1', // 1->display,0->hide
						"display_order"=>'1',
						"payOpts"	=>	$payOpts,
						);
	//////////pay settings end////////
	//////////google checkout start////////
	$payOpts = array();
	$payOpts[] = array(
					"title"			=>	"Merchant Id",
					"fieldname"		=>	"merchantid",
					"value"			=>	"1234567890",
					"description"	=>	"Example : 1234567890"
					);
	$paymethodinfo[] = array(
						"name" 		=> 'Google Checkout',
						"key" 		=> 'googlechkout',
						"isactive"	=>	'1', // 1->display,0->hide
						"display_order"=>'2',
						"payOpts"	=>	$payOpts,
						);
//////////google checkout end////////
//////////authorize.net start////////
$payOpts = array();
	$payOpts[] = array(
					"title"			=>	"Login ID",
					"fieldname"		=>	"loginid",
					"value"			=>	"yourname@domain.com",
					"description"	=>	"Example : yourname@domain.com"
					);
	$payOpts[] = array(
					"title"			=>	"Transaction Key",
					"fieldname"		=>	"transkey",
					"value"			=>	"1234567890",
					"description"	=>	"Example : 1234567890",
					);
	$paymethodinfo[] = array(
						"name" 		=> 'Authorize.net',
						"key" 		=> 'authorizenet',
						"isactive"	=>	'1', // 1->display,0->hide
						"display_order"=>'3',
						"payOpts"	=>	$payOpts,
						);
//////////authorize.net end////////
//////////worldpay start////////
	$payOpts = array();	
	$payOpts[] = array(
					"title"			=>	"Instant Id",
					"fieldname"		=>	"instId",
					"value"			=>	"123456",
					"description"	=>	"Example : 123456"
					);
	$payOpts[] = array(
					"title"			=>	"Account Id",
					"fieldname"		=>	"accId1",
					"value"			=>	"12345",
					"description"	=>	"Example : 12345"
					);
	$paymethodinfo[] = array(
						"name" 		=> 'Worldpay',
						"key" 		=> 'worldpay',
						"isactive"	=>	'1', // 1->display,0->hide\
						"display_order"=>'4',
						"payOpts"	=>	$payOpts,
						);
//////////worldpay end////////
//////////2co start////////
	$payOpts = array();
	$payOpts[] = array(
					"title"			=>	"Vendor ID",
					"fieldname"		=>	"vendorid",
					"value"			=>	"1303908",
					"description"	=>	"Enter Vendor ID Example : 1303908"
					);
	$payOpts[] = array(
					"title"			=>	"Notify Url",
					"fieldname"		=>	"ipnfilepath",
					"value"			=>	get_option('siteurl')."/?ptype=notifyurl&pmethod=2co",
					"description"	=>	"Example : http://mydomain.com/2co_notifyurl.php",
					);
	$paymethodinfo[] = array(
						"name" 		=> '2CO (2Checkout)',
						"key" 		=> '2co',
						"isactive"	=>	'1', // 1->display,0->hide
						"display_order"=>'5',
						"payOpts"	=>	$payOpts,
						);
//////////2co end////////
//////////pre bank transfer start////////
	$payOpts = array();
	$payOpts[] = array(
					"title"			=>	"Bank Information",
					"fieldname"		=>	"bankinfo",
					"value"			=>	"ICICI Bank",
					"description"	=>	"Enter the bank name to which you want to transfer payment"
					);
	$payOpts[] = array(
					"title"			=>	"Account ID",
					"fieldname"		=>	"bank_accountid",
					"value"			=>	"AB1234567890",
					"description"	=>	"Enter your bank Account ID",
					);
	$paymethodinfo[] = array(
						"name" 		=> 'Pre Bank Transfer',
						"key" 		=> 'prebanktransfer',
						"isactive"	=>	'1', // 1->display,0->hide
						"display_order"=>'6',
						"payOpts"	=>	$payOpts,
						);				
//////////pre bank transfer end////////
//////////pay cash on devivery start////////
	$payOpts = array();
	$paymethodinfo[] = array(
						"name" 		=> 'Pay Cash On Delivery',
						"key" 		=> 'payondelevary',
						"isactive"	=>	'1', // 1->display,0->hide
						"display_order"=>'7',
						"payOpts"	=>	$payOpts,
						);
//////////pay cash on devivery end////////
for($i=0;$i<count($paymethodinfo);$i++)
{
	$payment_method_info = array();
	$payment_method_info  = get_option('payment_method_'.$paymethodinfo[$i]['key']);
	if(!$payment_method_info)
	{
		update_option('payment_method_'.$paymethodinfo[$i]['key'],$paymethodinfo[$i]);
	}
}
/////////////// PAYMENT SETTINGS END ///////////////
/////////////// SHIPPING METHIDS START /////////////// 
$shippingmethodinfo = array();
$payOpts = array();
$payOpts[] = array(
				"title"			=>	"Enable Free Shipping?",
				"fieldname"		=>	"free_shipping_amt",
				"value"			=>	"0",
				"description"	=>	"Example : shipping amt = 0 ",
				);
$payOpts = array();
$shippingmethodinfo[] = array(
					"name" 		=> 'Free Shipping',
					"key" 		=> 'free_shipping',
					"isactive"	=>	'1', // 1->display,0->hide
					"payOpts"	=>	$payOpts,
					);
///////////////////////////////////////
$payOpts = array();
$payOpts[] = array(
				"title"			=>	"Shipping Amount",
				"fieldname"		=>	"flat_rate_amt",
				"value"			=>	"0",
				"description"	=>	"Example : enter a value that will be added as default for shipping when someone goes throught checkout"
				);
$shippingmethodinfo[] = array(
					"name" 		=> 'Flat Rate Shipping',
					"key" 		=> 'flat_rate',
					"isactive"	=>	'0', // 1->display,0->hide
					"payOpts"	=>	$payOpts,
					);
///////////////////////////////////////
$payOpts = array();
$payOpts[] = array(
				"title"			=>	"Price Shipping 1",
				"fieldname"		=>	"price_shipping1",
				"value"			=>	"10->100=1",
				"description"	=>	'Example : if total price is between $10 and $100 then shipping price is $1 so the equation is -> <strong>10->100=1</strong>'
				);
$payOpts[] = array(
				"title"			=>	"Price Shipping 2",
				"fieldname"		=>	"price_shipping2",
				"value"			=>	"101->200=10",
				"description"	=>	'Example : if total price is between $101 and $200 then shipping price is $10 so the equation is -> <strong>101->200=10</strong>'
				);
$payOpts[] = array(
				"title"			=>	"Price Shipping 3",
				"fieldname"		=>	"price_shipping3",
				"value"			=>	"201->300=20",
				"description"	=>	'Example : if total price is between $201 and $300 then shipping price is $20 so the equation is -> <strong>201->300=20</strong>'
				);
$payOpts[] = array(
				"title"			=>	"Price Shipping 4",
				"fieldname"		=>	"price_shipping4",
				"value"			=>	"301->500=50",
				"description"	=>	'Example : if total price is between $301 and $500 then shipping price is $50 so the equation is -> <strong>301->500=50</strong>'
				);
$payOpts[] = array(
				"title"			=>	"Price Shipping 5",
				"fieldname"		=>	"price_shipping5",
				"value"			=>	"501->1000=60",
				"description"	=>	'Example : if total price is between $301 and $500 then shipping price is $60 so the equation is -> <strong>301->500=60</strong>'
				);
$shippingmethodinfo[] = array(
					"name" 		=> 'Price Base Shipping',
					"key" 		=> 'price_base',
					"isactive"	=>	'0', // 1->display,0->hide
					"payOpts"	=>	$payOpts,
					);
///////////////////////////////////////
$payOpts = array();
$payOpts[] = array(
				"title"			=>	"Weight Shipping 1",
				"fieldname"		=>	"price_shipping1",
				"value"			=>	"1->10=10",
				"description"	=>	"Example : if total weight is between 1 lbs and 10 lbs then shipping price is $10 so the equation is -> <strong>1->10=10</strong>"
				);
$payOpts[] = array(
				"title"			=>	"Weight Shipping 2",
				"fieldname"		=>	"price_shipping2",
				"value"			=>	"11->51=20",
				"description"	=>	"Example : if total weight is between 11 lbs and 51 lbs then shipping price is $20 so the equation is -> <strong>11->51=20</strong>"
				);
$payOpts[] = array(
				"title"			=>	"Weight Shipping 3",
				"fieldname"		=>	"price_shipping3",
				"value"			=>	"51->100=30",
				"description"	=>	"Example : if total weight is between 51 lbs and 100 lbs then shipping price is $30 so the equation is -> <strong>51->100=30</strong>"
				);
$payOpts[] = array(
				"title"			=>	"Weight Shipping 4",
				"fieldname"		=>	"price_shipping4",
				"value"			=>	"101->150=40",
				"description"	=>	"Example : if total weight is between 101 lbs and 150 lbs then shipping price is $40 so the equation is -> <strong>101->150=40</strong>"
				);
$payOpts[] = array(
				"title"			=>	"Weight Shipping 5",
				"fieldname"		=>	"price_shipping5",
				"value"			=>	"151->200=40",
				"description"	=>	"Example : if total weight is between 101 lbs and 150 lbs then shipping price is $40 so the equation is -> <strong>151->200=40</strong>"
				);
$shippingmethodinfo[] = array(
					"name" 		=> 'Weight Base Shipping',
					"key" 		=> 'weight_base',
					"isactive"	=>	'0', // 1->display,0->hide
					"payOpts"	=>	$payOpts,
					);
						
for($i=0;$i<count($shippingmethodinfo);$i++)
{
	$shipping_method_info = array();
	$shipping_method_info  = get_option('shipping_method_'.$shippingmethodinfo[$i]['key']);
	if(!$shipping_method_info)
	{
		update_option('shipping_method_'.$shippingmethodinfo[$i]['key'],$shippingmethodinfo[$i]);
	}
}
/////////////// SHIPPING METHIDS END ///////////////
/////////////// DISCOUNT COUPON START ///////////////
$discount_coupons = array();
$discount_coupons  = get_option('discount_coupons');
if(!$discount_coupons)
{
	$discount_coupons_arr[] = array(
						"couponcode"	=>	'FRIENDS',
						"dis_per"		=>	'per',
						"dis_amt"		=>	'15',
						);
	$discount_coupons_arr[] = array(
						"couponcode"	=>	'SPECIAL',
						"dis_per"		=>	'amt',
						"dis_amt"		=>	'100',
						);
	update_option('discount_coupons',$discount_coupons_arr);
}
/////////////// DISCOUNT COUPON END ///////////////

/////////////// TERMS START ///////////////
require_once(ABSPATH.'wp-admin/includes/taxonomy.php');
$category_array = array(array('Women','Yoga Pants - Leggings','Shorts','Tops','New Dress'),'Kids',array('Men','Shirts','Jumpers Cardigans'),array('Shoe','Boots','Sandals'));
insert_category($category_array);
function insert_category($category_array)
{
	for($i=0;$i<count($category_array);$i++)
	{
		$parent_catid = 0;
		if(is_array($category_array[$i]))
		{
			$cat_name_arr = $category_array[$i];
			for($j=0;$j<count($cat_name_arr);$j++)
			{
				$catname = $cat_name_arr[$j];
				$last_catid = wp_create_category( $catname, $parent_catid);
				if($j==0)
				{
					$parent_catid = $last_catid;
				}
			}
			
		}else
		{
			$catname = $category_array[$i];
			wp_create_category( $catname, $parent_catid);
		}
	}
}
/////////////// TERMS END ///////////////

$post_info = array();
?>
<?php /*?>////post start 1///
$image_array = array();
$post_meta = array();
$post_meta = array(
					"tl_dummy_content"	=> '1',
				);
$post_info[] = array(
					"post_title"	=>	'Sample Lorem Ipsum Post',
					"post_content"	=>	'What is Lorem Ipsum?<br /><br />
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Why do we use it?<br /><br />It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using &acute;Content here, content here, making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for &acute;lorem ipsum will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
<br /><br />Where does it come from?',
					"post_meta"		=>	$post_meta,
					"post_image"	=>	$image_array,
					"post_category"	=>	array('Blog'),
					"post_tags"		=>	array()
					);
////post end///
////post start 1///
$image_array = array();
$post_meta = array();
$post_meta = array(
					"tl_dummy_content"	=> '1',
				);
$post_info[] = array(
					"post_title"	=>	'Sample Blog Post',
					"post_content"	=>	'orem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.',
					"post_meta"		=>	$post_meta,
					"post_image"	=>	$image_array,
					"post_category"	=>	array('Blog'),
					"post_tags"		=>	array()
					);
////post end///
////post start 1///
$image_array = array();
$post_meta = array();
$post_meta = array(
					"tl_dummy_content"	=> '1',
				);
$post_info[] = array(
					"post_title"	=>	'What is Lorem Ipsum?',
					"post_content"	=>	'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Why do we use it?<br /><br />It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using &acute;Content here, content here, making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for &acute;lorem ipsum will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
<br /><br />Where does it come from?',
					"post_meta"		=>	$post_meta,
					"post_image"	=>	$image_array,
					"post_category"	=>	array('Blog'),
					"post_tags"		=>	array()
					);
////post end///
$post_meta = array(
					"tl_dummy_content"	=> '1',
				);
$post_info[] = array(
					"post_title"	=>	'Letraset sheets',
					"post_content"	=>	'When an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Why do we use it?<br /><br />It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using &acute;Content here, content here, making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for &acute;lorem ipsum will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).<br /><br />Where does it come from?',
					"post_meta"		=>	$post_meta,
					"post_image"	=>	$image_array,
					"post_category"	=>	array('Blog'),
					"post_tags"		=>	array()
					);
////post end///
$post_meta = array(
					"tl_dummy_content"	=> '1',
				);
$post_info[] = array(
					"post_title"	=>	'Why do we use it?',
					"post_content"	=>	' It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Why do we use it?<br /><br />It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using &acute;Content here, content here, making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for &acute;lorem ipsum will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).',
					"post_meta"		=>	$post_meta,
					"post_image"	=>	$image_array,
					"post_category"	=>	array('Blog'),
					"post_tags"		=>	array()
					);
////post end///
?><?php */?>
<?php 
$image_array = array();
$image_array[0] = "dummy/shirts7.jpg";
$image_array[1] = "dummy/shirts1.jpg";
$image_array[2] = "dummy/shirts2.jpg";
$image_array[3] = "dummy/shirts3.jpg";
$image_array[4] = "dummy/shirts4.jpg";
$image_array[5] = "dummy/shirts5.jpg";
$image_array[6] = "dummy/shirts6.jpg";
$post_meta = array();
$post_meta_2='130';
$post_meta_3='90';
$post_meta1 = array(
					"price"					=> '130',	
					"specialprice"			=> '90',	
					"size"					=> 'x,xl,xxx,xxxl',
					"color"					=> 'red,black,blue,yellow,purple,pink',
 					"tl_dummy_content"		=> '1',
				);
$post_meta = array('key'=>$post_meta1,);
$post_info[] = array(
					"post_title"	=>	'Lauren Korey Shombry Shirt',
					"post_content"	=>	'- Shirt by Polo Jeans Ralph Lauren
    - Twin chest pockets and contrast buttons
    - Button through design and classic collar',
					"post_meta"		=>	$post_meta,
					"post_image"	=>	$image_array,
					"post_category"	=>	array('Shirts'),
					"post_meta"		=>	$post_meta,
					"post_tags"		=>	array('')
					);

////post end///
$image_array = array();
$image_array[0] = "dummy/shirts8.jpg";
$image_array[1] = "dummy/shirts1.jpg";
$image_array[2] = "dummy/shirts2.jpg";
$image_array[3] = "dummy/shirts3.jpg";
$image_array[4] = "dummy/shirts4.jpg";
$image_array[5] = "dummy/shirts5.jpg";
$image_array[6] = "dummy/shirts6.jpg";
$post_meta = array();
$post_meta_2='130';
$post_meta_3='90';
$post_meta1 = array(
					"price"					=> '130',	
					"specialprice"			=> '90',	
					"size"					=> 'x,xl,xxx,xxxl',
					"color"					=> 'red,black,blue,yellow,purple,pink',
 					"tl_dummy_content"		=> '1',
				);
$post_meta = array('key'=>$post_meta1,);
$post_info[] = array(
					"post_title"	=>	'Logan Check Shirt',
					"post_content"	=>	'- Shirt by Polo Jeans Ralph Lauren
    - All-over check print design and chest pockets
    - Button through design and long sleeve style',
					"post_meta"		=>	$post_meta,
					"post_image"	=>	$image_array,
					"post_category"	=>	array('Shirts'),
					"post_meta"		=>	$post_meta,
					"post_tags"		=>	array('')
					);
////post end///

$image_array = array();
$image_array[0] = "dummy/sandals2.jpg";
$image_array[1] = "dummy/sandals1.jpg";
$image_array[2] = "dummy/sandals3.jpg";
$image_array[3] = "dummy/sandals4.jpg";
$image_array[4] = "dummy/sandals5.jpg";
$image_array[5] = "dummy/sandals6.jpg";
$image_array[6] = "dummy/sandals7.jpg";
$post_meta = array();
$post_meta1 = array(
					"price"					=> '150',	
					"specialprice"			=> '100',	
					"size"					=> 'UK7,UK8,UK9,UK10',
					"color"					=> 'red,black,blue,yellow,purple,pink',
 					"tl_dummy_content"		=> '1',
				);
$post_meta = array('key'=>$post_meta1,);
$post_info[] = array(
					"post_title"	=>	'Studded gladiator',
					"post_content"	=>	'Imported polyurethane.Black or Snakeprint. Sizes 5-11; 6 1/2 - 8 1/2. #254-060 $78. ',
					"post_meta"		=>	$post_meta,
					"post_image"	=>	$image_array,
					"post_category"	=>	array('Sandals'),
					"post_meta"		=>	$post_meta,
					"post_tags"		=>	array('')
					);
////post end///
$image_array = array();
$image_array[0] = "dummy/sandals3.jpg";
$image_array[1] = "dummy/sandals1.jpg";
$image_array[2] = "dummy/sandals2.jpg";
$image_array[3] = "dummy/sandals4.jpg";
$image_array[4] = "dummy/sandals5.jpg";
$image_array[5] = "dummy/sandals6.jpg";
$image_array[6] = "dummy/sandals7.jpg";
$post_meta = array();
$post_meta_2='100';
$post_meta_3='70';
$post_meta1 = array(
					"price"					=> '100',	
					"specialprice"			=> '70',	
					"size"					=> 'UK7,UK8,UK9,UK10',
					"color"					=> 'red,black,blue,yellow,purple,pink',
 					"tl_dummy_content"		=> '1',
				);
$post_meta = array('key'=>$post_meta1,);
$post_info[] = array(
					"post_title"	=>	'Woven platform sandal',
					"post_content"	=>	'A strappy, sexy standout. Imported polyurethane.
5 heel with 1 platform.',
					"post_meta"		=>	$post_meta,
					"post_image"	=>	$image_array,
					"post_category"	=>	array('Sandals'),
					"post_meta"		=>	$post_meta,
					"post_tags"		=>	array('')
					);
////post end///
$image_array = array();
$image_array[0] = "dummy/sandals4.jpg";
$image_array[1] = "dummy/sandals1.jpg";
$image_array[2] = "dummy/sandals2.jpg";
$image_array[3] = "dummy/sandals3.jpg";
$image_array[4] = "dummy/sandals5.jpg";
$image_array[5] = "dummy/sandals6.jpg";
$image_array[6] = "dummy/sandals7.jpg";
$post_meta = array();
$post_meta_2='100';
$post_meta_3='70';
$post_meta1 = array(
					"price"					=> '100',	
					"specialprice"			=> '70',	
					"size"					=> 'UK7,UK8,UK9,UK10',
					"color"					=> 'red,black,blue,yellow,purple,pink',
 					"tl_dummy_content"		=> '1',
				);
$post_meta = array('key'=>$post_meta1,);
$post_info[] = array(
					"post_title"	=>	'Lizard print sandal',
					"post_content"	=>	'Imported polyurethane. 5 heel with 1 platform.',
					"post_meta"		=>	$post_meta,
					"post_image"	=>	$image_array,
					"post_category"	=>	array('Sandals'),
					"post_meta"		=>	$post_meta,
					"post_tags"		=>	array('')
					);
////post end///
$image_array = array();
$image_array[0] = "dummy/sandals5.jpg";
$image_array[1] = "dummy/sandals1.jpg";
$image_array[2] = "dummy/sandals2.jpg";
$image_array[3] = "dummy/sandals3.jpg";
$image_array[4] = "dummy/sandals4.jpg";
$image_array[5] = "dummy/sandals6.jpg";
$image_array[6] = "dummy/sandals7.jpg";
$post_meta = array();
$post_meta_2='100';
$post_meta_3='70';
$post_meta1 = array(
					"price"					=> '100',	
					"specialprice"			=> '70',	
					"size"					=> 'UK7,UK8,UK9,UK10',
					"color"					=> 'red,black,blue,yellow,purple,pink',
 					"tl_dummy_content"		=> '1',
				);
$post_meta = array('key'=>$post_meta1,);
$post_info[] = array(
					"post_title"	=>	'Ankle-cuff sandal',
					"post_content"	=>	'A wildly chic platform. Imported polyurethane.
5 heel with 1 platform.',
					"post_image"	=>	$image_array,
					"post_category"	=>	array('Boots'),
					"post_meta"		=>	$post_meta,
					"post_tags"		=>	array('')
					);
////post end///
$image_array = array();
$image_array[0] = "dummy/sandals6.jpg";
$image_array[1] = "dummy/sandals1.jpg";
$image_array[2] = "dummy/sandals2.jpg";
$image_array[3] = "dummy/sandals3.jpg";
$image_array[4] = "dummy/sandals4.jpg";
$image_array[5] = "dummy/sandals5.jpg";
$image_array[6] = "dummy/sandals7.jpg";
$post_meta = array();
$post_meta_2='110';
$post_meta_3='70';
$post_meta1 = array(
					"price"					=> '110',	
					"specialprice"			=> '70',	
					"size"					=> 'UK7,UK8,UK9,UK10',
					"color"					=> 'red,black,blue,yellow,purple,pink',
 					"tl_dummy_content"		=> '1',
				);
$post_meta = array('key'=>$post_meta1,);
$post_info[] = array(
					"post_title"	=>	'Camper Escher Sandals',
					"post_content"	=>	'- Men leather sandals by Camper
    - Multiple strap design with toe loop
   - Buckle fastening with cushioned sole',
					"post_image"	=>	$image_array,
					"post_category"	=>	array('Sandals'),
					"post_meta"		=>	$post_meta,
					"post_tags"		=>	array('')
					);
////post end///
$image_array = array();
$image_array[0] = "dummy/sandals7.jpg";
$image_array[1] = "dummy/sandals1.jpg";
$image_array[2] = "dummy/sandals2.jpg";
$image_array[3] = "dummy/sandals3.jpg";
$image_array[4] = "dummy/sandals4.jpg";
$image_array[5] = "dummy/sandals5.jpg";
$image_array[6] = "dummy/sandals6.jpg";
$post_meta = array();
$post_meta_2='120';
$post_meta_3='70';
$post_meta1 = array(
					"price"					=> '120',	
					"specialprice"			=> '70',	
					"size"					=> 'UK7,UK8,UK9,UK10',
					"color"					=> 'red,black,blue,yellow,purple,pink',
 					"tl_dummy_content"		=> '1',
				);
$post_meta = array('key'=>$post_meta1,);
$post_info[] = array(
					"post_title"	=>	'Creative Exclusive To ASOS Chunky',
					"post_content"	=>	'Men leather sandals by Officine Creative
    * - Contrast laces and chunky rivet detailing
    * - Slingback and thick contrast cleated sole',
					"post_image"	=>	$image_array,
					"post_category"	=>	array('Sandals'),
					"post_meta"		=>	$post_meta,
					"post_tags"		=>	array('')
					);
////post end///<?php */?>
<?php
$image_array = array();
$image_array[0] = "dummy/boots8.jpg";
$image_array[1] = "dummy/boots1.jpg";
$image_array[2] = "dummy/boots2.jpg";
$image_array[3] = "dummy/boots3.jpg";
$image_array[4] = "dummy/boots4.jpg";
$image_array[5] = "dummy/boots5.jpg";
$image_array[6] = "dummy/boots6.jpg";
$post_meta = array();
$post_meta_2='90';
$post_meta_3='70';
$post_meta1 = array(
					"price"					=> '90',	
					"specialprice"			=> '70',	
					"size"					=> 'UK7,UK8,UK9,UK10',
					"color"					=> 'red,black,blue,yellow,purple,pink',
 					"tl_dummy_content"		=> '1',
				);
$post_meta = array('key'=>$post_meta1,);
$post_info[] = array(
					"post_title"	=>	'Low fringe',
					"post_content"	=>	'Imported suede.',
					"post_category"	=>	array('Boots'),
					"post_meta"		=>	$post_meta,
					"post_image"	=>	$image_array,
					"post_tags"		=>	array('')
					);
////post end///



//===============================================================================//
//===============================================================================//
insert_posts($post_info);
function insert_posts($post_info)
{
	global $wpdb,$current_user;
	for($i=0;$i<count($post_info);$i++)
	{
		$post_title = $post_info[$i]['post_title'];
		
		$post_count = $wpdb->get_var("SELECT count(ID) FROM $wpdb->posts where post_title like \"$post_title\" and post_type='post' and post_status in ('publish','draft')");
		if(!$post_count)
		{
			
			$post_info_arr = array();
			$catids_arr = array();
			$my_post = array();
			$post_info_arr = $post_info[$i];
			if($post_info_arr['post_category'])
			{
				for($c=0;$c<count($post_info_arr['post_category']);$c++)
				{
					$catids_arr[] = get_cat_ID($post_info_arr['post_category'][$c]);
				}
			}else
			{
				$catids_arr[] = 1;
			}
			$my_post['post_title'] = $post_info_arr['post_title'];
			$my_post['post_content'] = $post_info_arr['post_content'];
			if($post_info_arr['post_author'])
			{
				$my_post['post_author'] = $post_info_arr['post_author'];
			}else
			{
				$my_post['post_author'] = 1;
			}
			$my_post['post_status'] = 'publish';
			$my_post['post_category'] = $catids_arr;
			$my_post['tags_input'] = $post_info_arr['post_tags'];
			$last_postid = wp_insert_post( $my_post );
			$post_meta = $post_info_arr['post_meta'];
			if($post_meta)
			{
				foreach($post_meta as $mkey=>$mval)
				{
					update_post_meta($last_postid, $mkey, $mval);
				}
			}
			
			$post_image = $post_info_arr['post_image'];
			update_post_meta($last_postid, 'tl_dummy_content', 1);
			if($post_image)
			{
				for($m=0;$m<count($post_image);$m++)
				{
					$menu_order = $m+1;
					$image_name_arr = explode('/',$post_image[$m]);
					$img_name = $image_name_arr[count($image_name_arr)-1];
					$img_name_arr = explode('.',$img_name);
					$post_img = array();
					$post_img['post_title'] = $img_name_arr[0];
					$post_img['post_status'] = 'attachment';
					$post_img['post_parent'] = $last_postid;
					$post_img['post_type'] = 'attachment';
					$post_img['post_mime_type'] = 'image/jpeg';
					$post_img['menu_order'] = $menu_order;
					$last_postimage_id = wp_insert_post( $post_img );
					update_post_meta($last_postimage_id, '_wp_attached_file', $post_image[$m]);					
					$post_attach_arr = array(
										"width"	=>	580,
										"height" =>	480,
										"hwstring_small"=> "height='150' width='150'",
										"file"	=> $post_image[$m],
										//"sizes"=> $sizes_info_array,
										);
					wp_update_attachment_metadata( $last_postimage_id, $post_attach_arr );
				}
			}
		}
	}
}
	/////////////// WIDGET SETTINGS START ///////////////
/*echo "<pre>";
//print_r(get_option('sidebars_widgets'));
print_r(get_option('widget_widget_home_slider'));
exit;*/

//--------- sidebar-1 --------------------
$widget_socialmediawidget = array();
$widget_socialmediawidget[1] = array(
					"title"			=>	'CONNECT WITH US',
					"text"			=>	'Stay up to date',
					"twitter"		=>	'#',
					"facebook"		=>	'#',
					"rss"			=>	'#',
					);
					
$widget_socialmediawidget['_multiwidget'] = '1';

update_option('widget_widget_socialmediawidget',$widget_socialmediawidget);
$widget_socialmediawidget = get_option('widget_widget_socialmediawidget');
krsort($widget_socialmediawidget);
foreach($widget_socialmediawidget as $key1=>$val1)
{
	$widget_socialmediawidget_key = $key1;
	if(is_int($widget_socialmediawidget_key))
	{
		break;
	}
}

$categories = array();
$categories[1] = array(
					"title"			=>	'Brands',
					"count"			=>	'0',
					"hierarchical"	=>	'0',
					"dropdown"		=>	'0',
					
					);					
$categories['_multiwidget'] = '1';

update_option('widget_categories',$categories);
$categories = get_option('widget_categories');
krsort($categories);
foreach($categories as $key1=>$val1)
{
	$categories_key = $key1;
	if(is_int($categories_key))
	{
		break;
	}
}
//prathap $wp_sidebar_widgets["sidebar-1"] = array("widget_socialmediawidget-$widget_socialmediawidget_key","categories-$categories_key");



//--------- sidebar-2 --------------------

$latest_product_info = array();
$latest_product_info[1] = array(
					"category"			=>	'',
					"title"				=>	'Latest Products',
					"display_prds_no"	=>	'16',
					"list_type"			=>	'Grid',
					"show_store_link"	=>	'1',
					"image_width"		=>	'',
					"image_height"		=>	'',
					"image_cut"			=>	'bottom left',
					
					);					
$latest_product_info['_multiwidget'] = '1';

update_option('widget_latest_product_info',$latest_product_info);
$latest_product_info = get_option('widget_latest_product_info');
krsort($latest_product_info);
foreach($latest_product_info as $key1=>$val1)
{
	$latest_product_info_key = $key1;
	if(is_int($latest_product_info_key))
	{
		break;
	}
}
$wp_sidebar_widgets["sidebar-2"] = array("latest_product_info-$latest_product_info_key");

//--------- sidebar-3 --------------------


//--------- sidebar-4 --------------------

$widget_socialmediawidget2 = array();
$widget_socialmediawidget2 = get_option('widget_widget_socialmediawidget');
$widget_socialmediawidget2[2] = array(
					"title"			=>	'CONNECT WITH US',
					"text"			=>	'Stay up to date',
					"twitter"		=>	'#',
					"facebook"		=>	'#',
					"rss"			=>	'#',			
								
					);				
$widget_socialmediawidget2['_multiwidget'] = '1';
update_option('widget_widget_socialmediawidget',$widget_socialmediawidget2);
$widget_socialmediawidget2 = get_option('widget_widget_socialmediawidget');
krsort($widget_socialmediawidget2);
foreach($widget_socialmediawidget2 as $key1=>$val1)
{
	$widget_socialmediawidget_key2 = $key1;
	if(is_int($widget_socialmediawidget_key2))
	{
		break;
	}
}

$categories2 = array();
$categories2 = get_option('widget_categories');
$categories2[2] = array(
					"title"			=>	'Brands',
					"count"			=>	'0',
					"hierarchical"	=>	'0',
					"dropdown"		=>	'0',			
								
					);				
$categories2['_multiwidget'] = '1';
update_option('widget_categories',$categories2);
$categories2 = get_option('widget_categories');
krsort($categories2);
foreach($categories2 as $key1=>$val1)
{
	$categories_key2 = $key1;
	if(is_int($categories_key2))
	{
		break;
	}
}


//prathap $wp_sidebar_widgets["sidebar-4"] = array("widget_socialmediawidget-$widget_socialmediawidget_key2","categories-$categories_key2");

//--------- sidebar-5 --------------------
$categories3 = array();
$categories3 = get_option('widget_categories');
$categories3[3] = array(
					"title"			=>	'Brands',
					"count"			=>	'0',
					"hierarchical"	=>	'0',
					"dropdown"		=>	'0',			
								
					);				
$categories3['_multiwidget'] = '1';
update_option('widget_categories',$categories3);
$categories3 = get_option('widget_categories');
krsort($categories3);
foreach($categories3 as $key1=>$val1)
{
	$categories_key3 = $key1;
	if(is_int($categories_key3))
	{
		break;
	}
}


//prathap $wp_sidebar_widgets["sidebar-5"] = array("categories-$categories_key3");


//--------- sidebar-6 --------------------
$widget_socialmediawidget4 = array();
$widget_socialmediawidget4 = get_option('widget_widget_socialmediawidget');
$widget_socialmediawidget4[4] = array(
					"title"			=>	'CONNECT WITH US',
					"text"			=>	'Stay up to date',
					"twitter"		=>	'#',
					"facebook"		=>	'#',
					"rss"			=>	'#',			
								
					);				
$widget_socialmediawidget4['_multiwidget'] = '1';
update_option('widget_widget_socialmediawidget',$widget_socialmediawidget4);
$widget_socialmediawidget4 = get_option('widget_widget_socialmediawidget');
krsort($widget_socialmediawidget4);
foreach($widget_socialmediawidget4 as $key1=>$val1)
{
	$widget_socialmediawidget_key4 = $key1;
	if(is_int($widget_socialmediawidget_key4))
	{
		break;
	}
}

$categories4 = array();
$categories4 = get_option('widget_categories');
$categories4[4] = array(
					"title"			=>	'Brands',
					"count"			=>	'0',
					"hierarchical"	=>	'0',
					"dropdown"		=>	'0',			
								
					);				
$categories4['_multiwidget'] = '1';
update_option('widget_categories',$categories4);
$categories4 = get_option('widget_categories');
krsort($categories4);
foreach($categories4 as $key1=>$val1)
{
	$categories_key4 = $key1;
	if(is_int($categories_key4))
	{
		break;
	}
}


//prathap $wp_sidebar_widgets["sidebar-6"] = array("widget_socialmediawidget-$widget_socialmediawidget_key4","categories-$categories_key4");


//--------- sidebar-7 --------------------

$normal_info = array();
$normal_info[1] = array(
					"title"		=>	'Want to work with us?',
					"desc1"		=>	'<p>Integer turpis arcu, pellentesque eget, cursus et, ferm ut, sapien. Fusce metus mi, eleifend solin,  molestied id , varius et, nibh. Donec nec libero.d asdas  Fusce metus mi, eleifend solin,  molestied id , varius et, nibh. Donec nec libero.d asdas   </p><p> Fusce metus mi, eleifend solin,  molestied id , varius et, nibh. Donec nec libero.d asdas   </p>',
					);
$normal_info['_multiwidget'] = '1';

update_option('widget_widget_normal',$normal_info);
$normal_info = get_option('widget_widget_normal');
krsort($normal_info);
foreach($normal_info as $key1=>$val1)
{
	$normal_info_key = $key1;
	if(is_int($normal_info_key))
	{
		break;
	}
}
//--------- sidebar-8 --------------------
$categories5 = array();
$categories5 = get_option('widget_categories');
$categories5[5] = array(
					"title"			=>	'Brands',
					"count"			=>	'0',
					"hierarchical"	=>	'0',
					"dropdown"		=>	'0',			
								
					);				
$categories5['_multiwidget'] = '1';
update_option('widget_categories',$categories5);
$categories5 = get_option('widget_categories');
krsort($categories5);
foreach($categories5 as $key1=>$val1)
{
	$categories_key5 = $key1;
	if(is_int($categories_key5))
	{
		break;
	}
}

//prathap $wp_sidebar_widgets["sidebar-8"] = array("widget_normal-$normal_info_key","categories-$categories_key5");

//--------- sidebar-10 --------------------

$categories6 = array();
$categories6 = get_option('widget_categories');
$categories6[6] = array(
					"title"			=>	'Brands',
					"count"			=>	'0',
					"hierarchical"	=>	'0',
					"dropdown"		=>	'0',			
								
					);				
$categories6['_multiwidget'] = '1';
update_option('widget_categories',$categories6);
$categories6 = get_option('widget_categories');
krsort($categories6);
foreach($categories6 as $key1=>$val1)
{
	$categories_key6 = $key1;
	if(is_int($categories_key6))
	{
		break;
	}
}


$recent_info = array();
$recent_info[1] = array(
					"title"				=>	'',
					"number"			=>	'5',
					);
$recent_info['_multiwidget'] = '1';

update_option('widget_recent-posts',$recent_info);
$recent_info = get_option('widget_recent-posts');
krsort($recent_info);
foreach($recent_info as $key1=>$val1)
{
	$recent_info_key = $key1;
	if(is_int($recent_info_key))
	{
		break;
	}
}

//prathap $wp_sidebar_widgets["sidebar-10"] = array("categories-$categories_key6","recent-posts-$recent_info_key");

//--------- sidebar-12 --------------------

$recent_info2 = array();
$recent_info2 = get_option('widget_recent-posts');
$recent_info2[2] = array(
					"title"				=>	'',
					"number"			=>	'5',
					);
$recent_info2['_multiwidget'] = '1';

update_option('widget_recent-posts',$recent_info2);
$recent_info2 = get_option('widget_recent-posts');
krsort($recent_info2);
foreach($recent_info2 as $key1=>$val1)
{
	$recent_info_key2 = $key1;
	if(is_int($recent_info_key2))
	{
		break;
	}
}

$categories7 = array();
$categories7 = get_option('widget_categories');
$categories7[7] = array(
					"title"			=>	'Brands',
					"count"			=>	'0',
					"hierarchical"	=>	'0',
					"dropdown"		=>	'0',			
								
					);				
$categories7['_multiwidget'] = '1';
update_option('widget_categories',$categories7);
$categories7 = get_option('widget_categories');
krsort($categories7);
foreach($categories7 as $key1=>$val1)
{
	$categories_key7 = $key1;
	if(is_int($categories_key7))
	{
		break;
	}
}


//prathap $wp_sidebar_widgets["sidebar-12"] = array("recent-posts-$recent_info_key2","categories-$categories_key7");

//--------- sidebar-14 --------------------

$categories8 = array();
$categories8 = get_option('widget_categories');
$categories8[8] = array(
					"title"			=>	'Brands',
					"count"			=>	'0',
					"hierarchical"	=>	'0',
					"dropdown"		=>	'0',			
								
					);				
$categories8['_multiwidget'] = '1';
update_option('widget_categories',$categories8);
$categories8 = get_option('widget_categories');
krsort($categories8);
foreach($categories8 as $key1=>$val1)
{
	$categories_key8 = $key1;
	if(is_int($categories_key8))
	{
		break;
	}
}

//prathap $wp_sidebar_widgets["sidebar-14"] = array("categories-$categories_key8");

//--------- sidebar-18 --------------------

$categories9 = array();
$categories9 = get_option('widget_categories');
$categories9[9] = array(
					"title"			=>	'Brands',
					"count"			=>	'0',
					"hierarchical"	=>	'0',
					"dropdown"		=>	'0',			
								
					);				
$categories9['_multiwidget'] = '1';
update_option('widget_categories',$categories9);
$categories9 = get_option('widget_categories');
krsort($categories9);
foreach($categories9 as $key1=>$val1)
{
	$categories_key9 = $key1;
	if(is_int($categories_key9))
	{
		break;
	}
}

$text_info = array();
$text_info[1] = array(
					"title"				=>	'Payment Mothod',
					"text"				=>	'<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam,  justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam  ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo  porttitor.</p>',
					);
$text_info['_multiwidget'] = '1';

update_option('widget_text',$text_info);
$text_info = get_option('widget_text');
krsort($text_info);
foreach($text_info as $key1=>$val1)
{
	$text_info_key = $key1;
	if(is_int($text_info_key))
	{
		break;
	}
}
//$wp_sidebar_widgets["sidebar-18"] = array("categories-$categories_key9","text-$text_info_key");


//--------- sidebar-19 --------------------

$categories10 = array();
$categories10 = get_option('widget_categories');
$categories10[10] = array(
					"title"			=>	'Brands',
					"count"			=>	'0',
					"hierarchical"	=>	'0',
					"dropdown"		=>	'0',			
								
					);				
$categories10['_multiwidget'] = '1';
update_option('widget_categories',$categories10);
$categories10 = get_option('widget_categories');
krsort($categories10);
foreach($categories10 as $key1=>$val1)
{
	$categories_key10 = $key1;
	if(is_int($categories_key10))
	{
		break;
	}
}

//prathap $wp_sidebar_widgets["sidebar-19"] = array("categories-$categories_key10");

//--------- sidebar-21 --------------------

$pages = array();
$pages = get_option('widget_pages');
$pages[1] = array(
					"title"			=>	'',
					"sortby"			=>	'post_title',
					"exclude"	=>	'',				
								
					);				
$pages['_multiwidget'] = '1';
update_option('widget_pages',$pages);
$pages = get_option('widget_pages');
krsort($pages);
foreach($pages as $key1=>$val1)
{
	$pages_key = $key1;
	if(is_int($pages_key))
	{
		break;
	}
}

$shopping_cart_info2 = array();
$shopping_cart_info2 = get_option('widget_shopping_cart_info2');
$shopping_cart_info2[12] = array(
					"title"			=>	'',				
					);				
$shopping_cart_info2['_multiwidget'] = '1';
update_option('widget_shopping_cart_info2',$shopping_cart_info2);
$shopping_cart_info2 = get_option('widget_shopping_cart_info2');
krsort($shopping_cart_info2);
foreach($shopping_cart_info2 as $key1=>$val1)
{
	$shopping_cart_info2_key = $key1;
	if(is_int($shopping_cart_info2_key))
	{
		break;
	}
}

$wp_sidebar_widgets["sidebar-21"] = array("shopping_cart_info2-$shopping_cart_info2_key"); 

//--------- sidebar-22 --------------------

//--------- sidebar-23 --------------------

$search = array();
$search[1] = array(
					"title"			=>	'',
								
					);				
$search['_multiwidget'] = '1';
update_option('widget_search',$search);
$search = get_option('widget_search');
krsort($search);
foreach($search as $key1=>$val1)
{
	$search_key = $key1;
	if(is_int($search_key))
	{
		break;
	}
}

// prathap $wp_sidebar_widgets["sidebar-23"] = array("search-$search_key");


//--------- sidebar-24 --------------------
$widget_home_slider = array();
$widget_home_slider[1] = array(
					"title"			=>	'',
					"category"		=>	'3',
					"post_number"	=>	'4',
					"post_link"		=>	'',
					"auto_rotate"	=>	'Yes',
					"speed"			=>	'5000',
					"image_width"	=>	'',
					"image_height"	=>	'',
					"content_lenght"=>	'700',
								
					);	

					
$widget_home_slider['_multiwidget'] = '1';
update_option('widget_widget_home_slider',$widget_home_slider);
$widget_home_slider = get_option('widget_widget_home_slider');
krsort($widget_home_slider);
foreach($widget_home_slider as $key1=>$val1)
{
	$widget_home_slider_key = $key1;
	if(is_int($widget_home_slider_key))
	{
		break;
	}
}

//$wp_sidebar_widgets["sidebar-24"] = array("widget_home_slider-$widget_home_slider_key");


//--------- sidebar-25 --------------------
$widget_subscribewidget_blue = array();
$widget_subscribewidget_blue[1] = array(
					"id"		=>	'',
					"title"		=>	'',
					"text"		=>	'',
					"twitter"	=>	'',
					"facebook"	=>	'',
					"digg"		=>	'',
					"myspace"	=>	'',		
					);						
$widget_subscribewidget_blue['_multiwidget'] = '1';
update_option('widget_widget_subscribewidget_blue',$widget_subscribewidget_blue);
$widget_subscribewidget_blue = get_option('widget_widget_subscribewidget_blue');
krsort($widget_subscribewidget_blue);
foreach($widget_subscribewidget_blue as $key1=>$val1)
{
	$widget_subscribewidget_blue_key = $key1;
	if(is_int($widget_subscribewidget_blue_key))
	{
		break;
	}
}

$wp_sidebar_widgets["sidebar-25"] = array("widget_subscribewidget_blue -$widget_subscribewidget_blue_key");

//--------- sidebar-26 --------------------
$widget_special_product = array();
$widget_special_product[1] = array(
					"title"			=>	'',
					"category"		=>	'1,2,3,4,5,6,7,8,9,10',
					"post_number"	=>	'1',
					"post_link"		=>	'',	
					);				
$widget_special_product['_multiwidget'] = '1';
update_option('widget_widget_special_product',$widget_special_product);
$widget_special_product = get_option('widget_widget_special_product');
krsort($widget_special_product);
foreach($widget_special_product as $key1=>$val1)
{
	$widget_special_product_key = $key1;
	if(is_int($widget_special_product_key))
	{
		break;
	}
}

//prathap $wp_sidebar_widgets["sidebar-26"] = array("widget_special_product-$widget_special_product_key");





//--------- sidebar-27 --------------------
$widget_advtwidget = array();
$widget_advtwidget[1] = array(
					"title"			=>	'',
					"advt1"			=>	'<img src="'.$dummy_image_path.'add1.png" alt="" />',					
					);					
$widget_advtwidget['_multiwidget'] = '1';
update_option('widget_widget_advtwidget',$widget_advtwidget);
$widget_advtwidget = get_option('widget_widget_advtwidget');
krsort($widget_advtwidget);
foreach($widget_advtwidget as $key1=>$val1)
{
	$widget_advtwidget_key = $key1;
	if(is_int($widget_advtwidget_key))
	{
		break;
	}
}


$latest_post1 = array();
$latest_post1[1] = array(
					"title"			=>	'',
					"category"		=>	'1',
					"post_number"	=>	'1',
					"post_link"		=>	'',
					);				
$latest_post1['_multiwidget'] = '1';
update_option('widget_latest_post1',$latest_post1);
$latest_post1 = get_option('widget_latest_post1');
krsort($latest_post1);
foreach($latest_post1 as $key1=>$val1)
{
	$latest_post1_key = $key1;
	if(is_int($latest_post1_key))
	{
		break;
	}
}

//prathap $wp_sidebar_widgets["sidebar-27"] = array("widget_advtwidget-$widget_advtwidget_key","latest_post1-$latest_post1_key");


//--------- sidebar-28 --------------------




//--------- sidebar-29 --------------------
$links = array();
$links[1] = array(
					"images"		=>	'0',
					"name"			=>	'0',
					"description"	=>	'0',
					"rating"		=>	'0',
					"category"		=>	'0',							
					);	
					
$links['_multiwidget'] = '1';
update_option('widget_links',$links);
$links = get_option('widget_links');
krsort($links);
foreach($links as $key1=>$val1)
{
	$links_key = $key1;
	if(is_int($links_key))
	{
		break;
	}
}

$wp_sidebar_widgets["sidebar-29"] = array("links-$links_key");


//--------- sidebar-30 --------------------
$links2 = array();
$links2 = get_option('widget_links');
$links2[2] = array(
					"images"		=>	'0',
					"name"			=>	'0',
					"description"	=>	'0',
					"rating"		=>	'0',
					"category"		=>	'0',					
					);	
					
$links2['_multiwidget'] = '1';
update_option('widget_links',$links2);
$links2 = get_option('widget_links');
krsort($links2);
foreach($links2 as $key1=>$val1)
{
	$links_key2 = $key1;
	if(is_int($links_key2))
	{
		break;
	}
}

$wp_sidebar_widgets["sidebar-30"] = array("links-$links_key2");

//--------- sidebar-31 --------------------

$widget_subscribewidget_blue2 = array();
$widget_subscribewidget_blue2 = get_option('widget_widget_subscribewidget_blue');
$widget_subscribewidget_blue2[2] = array(
					"id"		=>	'templatic',
					"title"		=>	'Newsletter',
					"text"		=>	'lorem ipusm dolor site amet dolor site aemte dolor site amet dolro sites amet ',
					"twitter"	=>	'',
					"facebook"	=>	'',
					"digg"		=>	'',
					"myspace"	=>	'',		
					);						
$widget_subscribewidget_blue2['_multiwidget'] = '1';
update_option('widget_widget_subscribewidget_blue',$widget_subscribewidget_blue2);
$widget_subscribewidget_blue2 = get_option('widget_widget_subscribewidget_blue');
krsort($widget_subscribewidget_blue2);
foreach($widget_subscribewidget_blue2 as $key1=>$val1)
{
	$widget_subscribewidget_blue_key2 = $key1;
	if(is_int($widget_subscribewidget_blue_key2))
	{
		break;
	}
}

$wp_sidebar_widgets["sidebar-31"] = array("widget_subscribewidget_blue -$widget_subscribewidget_blue_key2");


//--------- sidebar-32 --------------------

$widget_sociallink = array();
$widget_sociallink[1] = array(
					"title"			=>	'Social Media',
					"youtube"		=>	'#',
					"twitter"		=>	'#',
					"facebook"		=>	'#',
					"rss"			=>	'#',
								
					);	
					
$widget_sociallink['_multiwidget'] = '1';
update_option('widget_widget_sociallink',$widget_sociallink);
$widget_sociallink = get_option('widget_widget_sociallink');
krsort($widget_sociallink);
foreach($widget_sociallink as $key1=>$val1)
{
	$widget_sociallink_key = $key1;
	if(is_int($widget_sociallink_key))
	{
		break;
	}
}

$wp_sidebar_widgets["sidebar-32"] = array("widget_sociallink-$widget_sociallink_key");

//--------- sidebar-33 --------------------


$widget_advtwidget2 = array();
$widget_advtwidget2 = get_option('widget_widget_advtwidget');
$widget_advtwidget2[2] = array(
					"title"			=>	'',
					"advt1"			=>	'<img src="'.$dummy_image_path.'i_cards.png" alt="" />',					
					);					
$widget_advtwidget2['_multiwidget'] = '1';
update_option('widget_widget_advtwidget',$widget_advtwidget2);
$widget_advtwidget2 = get_option('widget_widget_advtwidget');
krsort($widget_advtwidget2);
foreach($widget_advtwidget2 as $key1=>$val1)
{
	$widget_advtwidget_key2 = $key1;
	if(is_int($widget_advtwidget_key2))
	{
		break;
	}
} 
$wp_sidebar_widgets["sidebar-33"] = array("widget_advtwidget-$widget_advtwidget_key2");
/*
echo "<pre>";
//print_r(get_option('sidebars_widgets'));
print_r(get_option('widget_widget_sociallink'));
exit; */

update_option('sidebars_widgets',$wp_sidebar_widgets);
/////////////// WIDGET SETTINGS END ///////////////
/////////////// Design Settings START ///////////////
update_option("ptthemes_alt_stylesheet",'1-default.css');
update_option("ptthemes_customcss",'true');
update_option("ptthemes_feed_name",'Templatic');
update_option("ptthemes_feedburner_url",'http://feeds.feedburner.com/Templatic');
update_option("ptthemes_storelink_display",'Show');
update_option("ptthemes_blogcatheader_display",'Show');
update_option("ptthemes_pageheader_display",'Show');
update_option("ptthemes_catheader_display",'Show');
update_option("ptthemes_storelink_display",'Hide');
update_option("ptthemes_breadcrumbs",'true');
update_option("ptthemes_prd_listing_format",'grid');
update_option("ptthemes_storeprd_number",'16');
update_option("ptthemes_prdlisttitle_showhide",'true');
update_option("ptthemes_prdlisttitle_order",'2');
update_option("ptthemes_prdlistimage_border",'true');
update_option("ptthemes_prdlistprice_showhide",'true');
update_option("ptthemes_prdlistprice_order",'3');
update_option("ptthemes_prdlistcontent_showhide",'true');
update_option("ptthemes_prdlistcontent_order",'4');
update_option("ptthemes_prdlistbutton_showhide",'true');
update_option("ptthemes_prdlistbutton_order",'5');
update_option("ptthemes_prd_listing_format_cat",'grid');
update_option("ptthemes_qty_txt_showhide",'Show');
update_option("ptthemes_qty_txt_cart_showhide",'Show');
update_option("ptthemes_max_qty_decimal",'2');
update_option("ptthemes_prd_weight_showhide",'Show');
update_option("ptthemes_tellfrnd_showhide",'Show');
update_option("ptthemes_addcomment_showhide",'Show');

update_option("ptthemes_add_to_cart_button_position",'Below Description');
update_option("ptthemes_related_prd_single",'Show');
update_option("ptthemes_related_prd_number",'5');
update_option("ptthemes_home_design_settings",'Full page');
update_option("ptthemes_all_pages_settings",'Full page');
update_option("ptthemes_inner_design_settings",'Full page');
update_option("ptthemes_product_design_settings",'Full page');
update_option("ptthemes_blog_design_settings",'Full page');
update_option("ptthemes_product_detail_design_settings",'Full page');
update_option("ptthemes_blog_detail_design_settings",'Full page');
update_option("ptthemes_store_design_settings",'Full page');
update_option("ptthemes_cart_design_settings",'Full page');
update_option("ptthemes_image_width",'170');
update_option("ptthemes_image_height",'160');
$blog_cat_id = $wpdb->get_var("SELECT term_id FROM $wpdb->terms where name='Blog'");
update_option("cat_exclude_$blog_cat_id",$blog_cat_id);

update_option("ptthemes_prd_listing_format",'grid');
update_option("ptthemes_storeprd_number",'8');
update_option("posts_per_page",'8');
update_option("ptthemes_prdlisttitle_showhide",'true');
update_option("ptthemes_prdlisttitle_order",'2');
update_option("ptthemes_prdlistimage_showhide",'true');
update_option("ptthemes_prdlistimage_border",'true');
update_option("ptthemes_prdlistprice_showhide",'true');
update_option("ptthemes_prdlistprice_order",'3');
update_option("ptthemes_prdlistcontent_showhide",'true');
update_option("ptthemes_prdlistcontent_order",'4');
update_option("ptthemes_prdlistbutton_showhide",'true');
update_option("ptthemes_prdlistbutton_order",'5');
update_option("ptthemes_storelink_display",'Show');
$blog_cat_id = $wpdb->get_var("SELECT group_concat(term_id) FROM $wpdb->terms where name in ('Beauty &amp; Fragrance','Digital Products','Icons','Wordpress Theme','Feature')");
update_option("ptthemes_categories_id",$blog_cat_id);
/////////////// Design Settings END ///////////////

global $blog_id;
if(get_option('upload_path') && !strstr(get_option('upload_path'),'wp-content/uploads'))
{
	$upload_folder_path = "wp-content/blogs.dir/$blog_id/files/";
}else
{
	$upload_folder_path = "wp-content/uploads/";
}
$folderpath = $upload_folder_path . "dummy/";
$strpost = strpos(CHILDTEMPLATEPATH,'wp-content');
$target = substr(CHILDTEMPLATEPATH,0,$strpost).$folderpath;
full_copy( CHILDTEMPLATEPATH."/images/dummy/", $target );
//full_copy( TEMPLATEPATH."/images/dummy/", ABSPATH . "wp-content/uploads/dummy/" );
function full_copy( $source, $target ) 
{
	global $upload_folder_path;
	$imagepatharr = explode('/',$upload_folder_path."dummy");
	$year_path = ABSPATH;
	for($i=0;$i<count($imagepatharr);$i++)
	{
	  if($imagepatharr[$i])
	  {
		  $year_path .= $imagepatharr[$i]."/";
		  //echo "<br />";
		  if (!file_exists($year_path)){
			  mkdir($year_path, 0777);
		  }     
		}
	}
	@mkdir( $target );
		$d = dir( $source );
		
	if ( is_dir( $source ) ) {
		@mkdir( $target );
		$d = dir( $source );
		while ( FALSE !== ( $entry = $d->read() ) ) {
			if ( $entry == '.' || $entry == '..' ) {
				continue;
			}
			$Entry = $source . '/' . $entry; 
			if ( is_dir( $Entry ) ) {
				full_copy( $Entry, $target . '/' . $entry );
				continue;
			}
			@copy( $Entry, $target . '/' . $entry );
		}
	
		$d->close();
	}else {
		@copy( $source, $target );
	}
}
?>